#ifndef _SOCKET_H_
#define _SOCKET_H_
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#endif
#define  TA_DATA                0x02
#define  QUERY_PORT             3000
#define  PACKET_MAX_LEN         256
#define  TIMEOUT                30

SOCKET TCPConnect(char* ip , unsigned short Port);

void TCPDisconnect(SOCKET  conn_socket);

int TCPSendData (SOCKET conn_socket, const char * buf,  int len);
int TCPRecvData(SOCKET conn_socket, char * buf, int l, int timeout);

DWORD WINAPI RecvThread(LPVOID lpRecv);


typedef struct _RECVDATA{
        SOCKET conn_socket;
        char*  buf;
        int    len;
        int   recvlen;
}RECVDATA;

typedef RECVDATA*  LPRECVDATA;


